import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import mydevice from '@/components/mydevice'
import myinfo from '@/components/myinfo'
import mydriver from '@/components/mydriver'
import login from '@/components/login'
import devicelist from '@/components/devicelist'
import JurisdictionManage from '@/components/jurisdictionManage'
import roleManage from '@/components/roleManage'
import userManage from '@/components/userManage'
import chats from '@/components/chats'
import depchats from '@/components/depchats'
import err404 from '@/components/err404'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'main',
      component: Main,
      meta: {
        requireAuth: true,
        jursidiction: true
      }

    }, {
      path: '/mydevice',
      name: 'mydevice',
      component: mydevice,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    }, {
      path: '/myinfo',
      name: 'myinfo',
      component: myinfo,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/mydriver',
      name: 'mydriver',
      component: mydriver,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/login',
      name: 'login',
      component: login

    },


    {
      path: '/devicelist',
      name: 'devicelist',
      component: devicelist,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/jurisdictionManage',
      name: 'jurisdictionManage',
      component: JurisdictionManage,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/roleManage',
      name: 'roleManage',
      component: roleManage,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/userManage',
      name: 'userManage',
      component: userManage,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/chats',
      name: 'chats',
      component: chats,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/depchats',
      name: 'depchats',
      component: depchats,
      meta: {
        requireAuth: true,
        jursidiction: true
      }
    },
    {
      path: '/404',
      name: '404',
      component: err404
    }

  ]

})
